package ourGame;

public class Boundary
{
	int x1, x2, y1, y2;
	
	public Boundary(int x1, int x2, int y1, int y2)
	{
		this.x1 = x1;
		this.x2 = x2;
		this.y1 = y1;
		this.y2 = y2;
	}
	
	public boolean isValidLocation(int x, int y)
	{
		if(x == x1 && (y > y1 && y < y2))
			return false;
		if(x == x2 && (y > y1 && y < y2))
			return false;
		
		if(y == y1 && (x > x1 && x < x2))
			return false;
		if(y == y2 && (x > x1 && x < x2))
			return false;
		
		return true;
	}
	public int getX1()
	{
		return x1;
	}
	public int getX2()
	{
		return x2;
	}
	public int getY1()
	{
		return y1;
	}
	public int getY2()
	{
		return y2;
	}

	
	
}